//
//  AppDelegate.swift
//  CJPWB
//
//  Created by 陈锦彭 on 16/3/11.
//  Copyright © 2016年 chenjinpeng. All rights reserved.
//

import UIKit

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?


    func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
               
        //配置TabBar的全局颜色
        UITabBar.appearance().tintColor = UIColor.orangeColor()
        //配置NavigationItem的全局颜色
        UINavigationBar.appearance().tintColor = UIColor.orangeColor()
        //判断用户是否有授权登陆
        window = UIWindow()
       window?.rootViewController =  UserAccountViewModel.shareInstance.isLogin ? WelcomeViewController() : UIStoryboard(name: "Main", bundle: nil).instantiateInitialViewController()
        window?.makeKeyAndVisible()
        return true
    }

    

}

